import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

Vue.filter("filterPrice",(p)=>p.toFixed(2));
Vue.filter("filterTime",(t)=>{
  let d = new Date(t);
  let year = d.getFullYear();
  let month = (d.getMonth() + 1 + "").padStart(2,"0");
  let day = (d.getDate() + "").padStart(2,"0");
  let h = (d.getHours() + "").padStart(2,"0");
  let m = (d.getMinutes() + "").padStart(2,"0");
  let s = (d.getSeconds() + "").padStart(2,"0");

  return `${year}-${month}-${day} ${h}:${m}:${s}`;
})

new Vue({
  render: h => h(App),
}).$mount('#app')
